package com.sch.www.common.security.oauth2.exceptions;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.sch.www.common.security.oauth2.serializer.CustomOauthExceptionSerializer;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;


@JsonSerialize(using = CustomOauthExceptionSerializer.class)
public class CustomOauth2Exception extends OAuth2Exception {

    /**
     * 错误码
     */
    private int code;
    private  String s;

    public CustomOauth2Exception(OAuth2Exception e) {
        super(e.getOAuth2ErrorCode(), e);
        this.code = code;
        this.s="101001";
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }


    public String getS() {
        return s;
    }

    public void setS(String s) {
        this.s = s;
    }
}
